//Kathryn Glowinski
//SchedulePopulation.h
//A declaration of the SchedulePopulation class

#ifndef SCHEDULEPOPULATION_H_
#define SCHEDULEPOPULATION_H_

#include <vector>
#include <string>
#include "scheduleconflicts.h"
#include "scheduleindividual.h"
#include <QVector>

using namespace std;

class SchedulePopulation {

public:
        SchedulePopulation(int,int, ScheduleConflicts*, int);
        ~SchedulePopulation();
        void populateRandomly();
        void populateFromVector(QVector<ScheduleIndividual*>*);
        SchedulePopulation* reproduce();
        string getBestGenes();
        double getBestFitness();
        ScheduleIndividual* createChild();
        int getPopSize();
        int getIndivSize();
        int randomParent();
        double getFitnessThreshold();
        double fRand(double, double);

        //Stores all of the BitIndividuals
        vector<ScheduleIndividual*>* sPop;

private:
       //Stores the fitness of each vector
        vector<double>* sFit;

        int popSize;
        int vecSize;
        int bestIndex;

        //This just gives us the ability to pass the scheduleconflicts along anywhere
        //within the SchedulePopulation
        ScheduleConflicts* sc;
        //This allows us to pass the number of available time slots, k
        int times;
};



#endif /* SCHEDULEPOPULATION_H_ */
